//
//  ZBTwoCollectionViewCell.m
//  MoBan
//
//  Created by apple on 16/7/8.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "ZBTwoCollectionViewCell.h"
@interface ZBTwoCollectionViewCell()
@property(nonatomic,strong)UILabel *nameLable;
@property(nonatomic,strong)UILabel *detailLable;
@property(nonatomic,strong)UIImageView *imageview;
@end
@implementation ZBTwoCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self addUI];
    }
    return self;
}
/**
 
 添加控件
 */
-(void)addUI
{
    self.nameLable = [[UILabel alloc]init];
    self.nameLable.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:self.nameLable];
    
    self.detailLable = [[UILabel alloc]init];
    self.detailLable.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:self.detailLable];
    
    self.imageview = [[UIImageView alloc]init];
    self.imageview.image = [UIImage imageNamed:@"text.png"];
    [self.contentView addSubview:self.imageview];

}
-(void)layoutSubviews
{
    [super layoutSubviews];
    
    self.nameLable.frame = CGRectMake(0, 5*Kscr, self.width, 20*Kscr);
    self.detailLable.frame  =CGRectMake(0, self.nameLable.bottom+5*Kscr, self.width, 20*Kscr);
    
    self.imageview.frame = CGRectMake(10*Kscr, self.detailLable.bottom+10*Kscr, self.width-20*Kscr, self.height-self.detailLable.bottom-15*Kscr);
}
-(void)ZBSetTwodasouce:(NSString *)str
{
    
    self.nameLable.text =@"一元秒杀";

    self.detailLable.text = @"天天开枪";

    
//    self.nameLable.text = str;
    NSLog(@"第二个%@",str);
}

@end
